package com.kma.summer2012.client.events.engineer;

import com.google.gwt.event.shared.EventHandler;
import com.google.gwt.event.shared.GwtEvent;
import com.kma.summer2012.shared.model.UICrumbsRequest;

public class EngineerShowRequestEvent extends GwtEvent<EngineerShowRequestEvent.ManagerShowRequestEventHandler> {
    public static GwtEvent.Type<ManagerShowRequestEventHandler> TYPE = new GwtEvent.Type<ManagerShowRequestEventHandler>();

    private UICrumbsRequest request;

    public EngineerShowRequestEvent(UICrumbsRequest req) {
        request = req;
    }

    public EngineerShowRequestEvent() {
        //To change body of created methods use File | Settings | File Templates.
    }

    public interface ManagerShowRequestEventHandler extends EventHandler {
        void onEngineerShowRequestEvent(EngineerShowRequestEvent event, UICrumbsRequest request);
    }

    @Override
    public Type<ManagerShowRequestEventHandler> getAssociatedType() {
        return TYPE;
    }


    public static Type<ManagerShowRequestEventHandler> getType() {
        return TYPE;
    }

    protected void dispatch(ManagerShowRequestEventHandler handler) {
        handler.onEngineerShowRequestEvent(this, request);
    }


}

